//
//  XDLMTotallIncomeTableViewCell.m
//  xindailianmeng
//
//  Created by 许佳奇 on 17/3/15.
//  Copyright © 2017年 xindailianmeng.cn. All rights reserved.
//*******累计收益

#import "XDLMTotallIncomeTableViewCell.h"

@implementation XDLMTotallIncomeTableViewCell
{
    UILabel *_nameLab;
    UILabel *_dateLab;
    UILabel *_moneyLab;
}
- (void)awakeFromNib {
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUI];
    }
    return self;
}
- (void)setUI
{
    _nameLab = [self createLabelWithFrame:CGRectMake(15, 10*kscale, kScreenW/2-10, 18) text:@"优选计划-1个月" textFont:[UIFont systemFontOfSize:14] textColor:[UIColor colorWithRed:102.0/255.0 green:102.0/255.0 blue:102.0/255.0 alpha:1]];
    _nameLab.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_nameLab];
    
    _dateLab = [self createLabelWithFrame:CGRectMake(15, 32*kscale, kScreenW/2-10, 12) text:@"2016-12-11 20:54:00" textFont:[UIFont systemFontOfSize:10] textColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1]];
    _dateLab.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_dateLab];
    
    _moneyLab = [self createLabelWithFrame:CGRectMake(kScreenW/2, 10*kscale, kScreenW/2 - 15, 30*kscale) text:@"+20.00" textFont:[UIFont systemFontOfSize:16] textColor:[UIColor colorWithRed:51.0/255.0 green:51.0/255.0 blue:51.0/255.0 alpha:1]];
    _moneyLab.textAlignment = NSTextAlignmentRight;
    [self addSubview:_moneyLab];
    
    
    
}
- (UILabel *)createLabelWithFrame:(CGRect)frame text:(NSString *)text textFont:(UIFont *)font textColor:(UIColor *)color {
    
    UILabel * label = [[UILabel alloc] initWithFrame:frame];
    label.text = text;
    label.textColor = color;
    label.font = font;
    label.adjustsFontSizeToFitWidth = YES;
    label.textAlignment = NSTextAlignmentCenter;
    
    return label;
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
